Package com.appspot.gaeforum309.pathing

Source Code of com.appspot.gaeforum309.pathing.Path

package com.appspot.gaeforum309.pathing;

import java.util.List;

import com.appspot.gaeforum309.pathing.PathBuilder.IPathable;

public class Path {
  private final List<IPathable> path;

  Path(List<IPathable> path) {
    this.path = path;
  }

  public List<IPathable> getPath() {
    return path;
  }

  public String objectTagName() {
    IPathable iobject = path.get(0);
    if (iobject == null)
      return null;

    return iobject.getPathable().getTagName();
  }
 
  public IPathable object()
  {
    return path.get(0);
  }
 
  public IPathable getObjectByTagName(String tagName)
  {
    if(tagName == null)
      return null;
   
    for(IPathable ip: path)
    {
      if(ip.getPathable().getTagName().equals(tagName))
        return ip;
    }
   
    return null;
  }
}
TOP

Related Classes of com.appspot.gaeforum309.pathing.Path

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.